<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>最具创意年货大比拼</title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.css" />
  <link rel="stylesheet" type="text/css" href="{$resource_basic}/css/webapp.css" />
  <!--<link rel="stylesheet" href="../Founding/detail_new.html" type="text/css">-->

  <script type="text/javascript" src="{$resource_basic}/js/jquery.min.js"></script>
  <script type="text/javascript" src="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.js"></script>
  
  <style>
      body{
          background-color:  #fefefe;
      }
      .blend-panel{background-color: #fafcfb;}
      .blend-picture-full img{
          margin: 0;
      }
      .top_create_bg{
          background-image: url("{$resource_basic}img/vote/index_top_bg.jpg");
          height: 16rem;
          width: 100%;
          background-size:contain;
      }
      
      @media screen and (max-width: 320px)
        {
            .top_create_bg{
              height: 13.2rem;
          }
        }
        
        @media screen and (max-width: 360px)
        {
            .top_create_bg{
              height: 15rem;
          }
        }
        
        
      .top_create_bg [class*=blend-col-]{
          background-color:#ffea01;
          border: none;
      }
      
      .top_create_bg [class*=blend-col-4]{
          background-color:#ffea01;
          border: none;
          color: #f9493c;
          text-align: center;
          font-size: 1.6rem;
          font-weight: 700;
      }
      
      .page_bg [class*=blend-col-]{
          background-color:#fefefe;
          border: none;
      }
      
      .page_bg [class*=blend-col-8]{
          background-color:#fefefe;
          border: none;
          color: #f9493e;
          text-align: center;
          font-size: 2rem;
      }
      .page_bg [class*=blend-col-9]{
          background-color:#fefefe;
          border: none;
          color: #f9493e;
          text-align: center;
          font-size: 2rem;
      }
      .page_bg .current,.page_bg .num,.page_bg .prev,.page_bg .next,.page_bg .end,.page_bg .first{
          display: inline-block;
        padding: 5px;
        color: #f9493e;
        border: 1px solid #f9493e;
        width: 3.2rem;
        height: 4rem;
        text-align: center;
        line-height: 3rem;
          
      }
      .page_bg .current{
          color: #fff;
          background-color: #f9493e;
      }
      
      .page_bg .num a,.page_bg .prev a,.page_bg .next a{
          color: #f9493e;
      }
      
      
      .create_option_btn,.create_option_btn:focus,.create_option_btn:hover{
          background-color: #f9493c;
          border-radius: 10px;
          border: none;
          box-shadow: 1px 3px 2px 1px #A30001;
      }
      
      .blend-suggest-input-gray .blend-suggest-ico{
          background-color: #ff756B;
      }
      .blend-suggest-input-gray input{
          background-color: #fafcfb;
      }
      .blend-suggest-input-gray{
          border-color: #ff756B;
          border-radius:5px;
      }
      .btn_show,.btn_show:focus,.btn_show:active,.btn_show:hover
      {
          background-color: #ff756b;
          border: none;
          color: #fff;
      }
      
      .btn_show_foucus,.btn_show_foucus:focus,btn_show_foucus:active,.btn_show_foucus:hover
      {
          background-color: #f9493c;
      }
      .blend-card-img-view-img{
          width: 130px;
          height: 130px;
          float: left;
          
      }
      .blend-card-img-view-content{
          
          /*background-color: #fff000;*/
          /*float: right;*/
      }
      .blend-card-title{
          font-size: 1.8rem;
      }
      .blend-card-sub-title.blend-card-small-title{
          font-size: 1.5rem;
          padding: 0.5rem 0 0 0;
      }
      .vote_btn{
          position: absolute;
          bottom: 10px;
          border-radius: 24px;
          background-color: #f9493e;
          border: none;
          color: #fff;
          right: 1rem;
          height: 4rem;
          width: 10rem;
          font-size: 2rem;
      }
  </style>
</head>

<body>
    <!--头部图片-->
    <figure class="blend-picture blend-picture-full ">
       <img src="{$resource_basic}img/vote/index_banner.jpg"> 
    </figure>
    
    
    
    
   <!--我要报名-->
   
   <div class="blend-grid blend-container-fluid top_create_bg">
       <div class="blend-row">
           <span class="blend-col-2"></span>
           <span class="blend-col-8">
               <button id='create_option_chk' class="blend-button blend-button-primary blend-button-large create_option_btn">我要报名参赛</button>
           </span>
           <span class="blend-col-2"></span>
       </div>
       <br/>
       <div class="blend-row">
           <span class="blend-col-4">
               已报名
               <br/>
               {$initial_info.vote_option_count}
           </span>
           <span class="blend-col-4" style=" border-left: 1px solid #f9493c;">
               投票人次
               <br/>
               {$initial_info.got_prize_count}
           </span>
           <span class="blend-col-4" style=" border-left: 1px solid #f9493c;">
               访问量
               <br/>
               {$initial_info.pv}
           </span>
       </div>
   </div>
   
   <!--搜索框-->
   
   <!--参赛作品-->

    <volist name='result' id='vo'>
        <a href="{:U('M/Vote/vote_detail',array('vid'=>$vo['id']))}">
       <div class="blend-card blend-card-no-icon" style=" position: relative;  height: 150px; background-color: #fefefe; border: 1px solid #efeff0;">
            <div class="blend-card-img-view blend-card-img-view-img">
                <img src="{$vo.thumb_list.0}">
            </div>
            <div class="blend-card-content-view blend-card-img-view-content" style=" max-height: 72px;">
                <div class="blend-card-title">
                    <span style='color: #f9493c;'>{$vo.vote_count}票/第{$vo.rank}名</span> <span style='float:right; color: #49c1fe;'>{$vo.id}号</span> 
                </div>
                <div class="blend-card-sub-title blend-card-small-title">{$vo.content}</div>
                <div class="blend-card-sub-title blend-card-small-title" >
                    <button href="{:U('M/Vote/vote_detail',array('vid'=>$vo['id']))}" class="blend-button blend-button-default vote_btn">投票</button>
                </div>
                

            </div>
        </div>
        </a>
    </volist>
   <!--分页-->
   <div class="blend-grid blend-container-fluid page_bg">
       <div class="blend-row">
           <span class="blend-col-1"></span>
           <span class="blend-col-9">
               {$page}
           </span>
           <span class="blend-col-1"></span>
       </div>
       
   </div>
   
   
   <!--活动介绍-->
   <figure class="blend-picture blend-picture-full ">
       <img src="{$resource_basic}img/vote/test.jpg"> 
    </figure>
   
    

<div id="customDialogNianhuo" class="blend-dialog" style="background-color: #FE746A;">
        <div class="blend-grid blend-container-fluid" style="margin-top:20px; background-color: #FE746A;">
            <div class="" style=" margin-top:10px; margin-bottom:10px; text-align: center; font-size: 1.5rem; color: #fff;">
                长按下方图片，点击识别二维码
            </div>
            <img src="/Public/template/default/img/vote/showqrcode_nianhuo2.jpeg" style=" width: 100%;"/>
            <div class="" style=" margin-top:10px; margin-bottom:10px; text-align: center; font-size: 1.5rem;color: #fff;">
                关注并进入公众号后，<br/>就可以进行参赛啦~
            </div>  
        </div>
    </div>
<!--底部菜单-->
<div style=" height: 60px;"></div>
<div class="footer_nav">
    <nav data-blend-widget="tabnav" class="blend-tabnav" style="margin-bottom: 0px; bottom: 0px; position: absolute; width: 100%; height: 50px; border-top: #b2b2b2 1px solid;">
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('M/Vote/index')}" style="height:50px;">
            <img src="{$resource_basic}/img/vote/index01.png" style=" height: 50%;margin-top: 5px;"/>
                <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px;font-size: 12px; color: #777">
                     首页
                </span>
        </a>
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('M/Vote/ranks',array('state'=>1))}" style="height:50px;">
                     <img src="{$resource_basic}/img/vote/index021.png" style=" height: 50%;margin-top: 5px;"/>
                    <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px;font-size: 12px; color: #FF756B;">
                     排名
                </span>
        </a>
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('M/Vote/create')}" style="height:50px;">
                     <img src="{$resource_basic}/img/vote/index03.png" style=" height: 50%;margin-top: 5px;"/>
                     <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px; font-size: 12px; color: #777;">
                     报名
                </span>
        </a>
        <a class="blend-tabnav-item blend-tabnav-item-active" href="{:U('M/Vote/steps')}" style="height:50px;">
                     <img src="{$resource_basic}/img/vote/index04.png" style=" height: 50%;margin-top: 5px;"/>
                     <span class="blend-tabnav-item-text" style="height:30px; line-height: 16px; font-size: 12px; color: #777;">
                     得奖攻略
                </span>
        </a>


     </nav>
</div>
    <!--底部菜单end-->
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
//分享

wx.config({
    debug: false,
    appId: '{$signPackage["appId"]}',
    timestamp: {$signPackage["timestamp"]},
    nonceStr: '{$signPackage["nonceStr"]}',
    signature: '{$signPackage["signature"]}',
    jsApiList: [
      // 所有要调用的 API 都要加到这个列表中
      'onMenuShareTimeline',
      'onMenuShareAppMessage'
    ]
});



 wx.ready(function () {
// 在这里调用 API
    wx.onMenuShareTimeline({
        title: '我领了9个现金红包，看看你能领多少个！', // 分享标题
        desc: '年货送什么，这创意我跪了，一起参与创意投票领奖吧', // 分享描述
        link: "{$site_url}{:U('M/Vote/index')}"+"?vsid=1", // 分享链接
        imgUrl: 'http://www.zhongcetianxia.com/Public/template/default/img/vote/share_ico.jpg', // 分享图标
        success: function () { 
            // 用户确认分享后执行的回调函数，生成红包

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });
    
    wx.onMenuShareAppMessage({
        title: '我领了8个红包，你呢?', // 分享标题
        desc: '简单参与即领，还有机会抢Iphone6/Ipad/500元购物卡', // 分享描述
        link: "{$site_url}{:U('M/Vote/index')}"+"?vid=1", // 分享链接
        imgUrl: 'http://www.zhongcetianxia.com/Public/template/default/img/vote/share_ico.jpg', // 分享图标
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () { 
            // 用户确认分享后执行的回调函数

        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    });

});


</script>

<script>
    $(function(){
        
        /*
         * 动态获取屏幕的宽度 window.screen.width
         */
        

       
        
         $(".blend-suggest-ico").click(function(){
            var idnum = $("#idnum").val();
            if(idnum!="")
            {
//                alert("{:U('M/Vote/index',array('vsid'=>$vsid,))}"+"?idnum="+idnum);
                window.location.href = "{:U('M/Vote/index',array('vsid'=>$vsid))}"+"?idnum="+idnum;
            }
        });
        
         $("#add_commnet").bind('click',function(){
            $(".blend-dialog").dialog("show");
        });
        
        $("#success").click(function(){
        
        var content = $("#content").val();
        
        //评论不能为空
        if(content.length===0)
        {
            alert("评论不能为空");
            return false;
        }
        var pid=0;
        
        $.ajax({ 
                   type: 'POST', 
                   url: '{:U("M/News/comments_add")}', 
                   dataType: 'json', 
                   data:"pid=",
                   cache: false, 
                   error: function(){ 
                       return false; 
                   }, 
                   success:function(json){ 
                        if(json===1)
                        {
                            window.location.reload();
                        }
                        else
                        {
                            alert("添加失败，请稍后再试");
                            
                        }
                        
                        $(".blend-dialog").dialog("hide");
                        
                   } 
               });

    });
    
    $("#create_option_chk").bind('click',function(){
             open_loading();
             $.ajax({ 
                   type: 'GET', 
                   url: '{:U("M/Vote/get_member_status")}', 
                   dataType: 'json', 
                   data:"",
                   cache: false, 
                   error: function(){ 
                       return false; 
                   }, 
                   success:function(json){ 
                       close_loading();
//                       alert(json);
                       if(json===1)
                       {
                           window.location.href="{:U('M/Vote/create')}";
                       }
                       else
                       {
                           $("#customDialogNianhuo").dialog("show");
                       }

                   } 
               });
               
            
        });
    
    });
    
     
    
    
    
    $("#customDialog").dialog({
        maskTapClose:true,
        renderType:2
    });
    
    $("#customDialogNianhuo").dialog({
        maskTapClose:true,
        renderType:2
    });
    
    function open_loading()
    {
        var loading = $.blend.loading();
        loading.show();
    }
    
    function close_loading()
    {
        $('.blend-loading').hide();
    }
    

</script>
<?php require_once 'cs.php';echo '<img src="'._cnzzTrackPageView(1256622573).'" width="0" height="0"/>';?>
<include file="Index/foot_analyze"/>
</body>
</html>